<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>控制台</title>

    <style>
        body{font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, Arial, sans-serif}
    </style>

    <!-- Global stylesheets -->
    {css file="__STATIC__/css/icons/icomoon/styles.css"}
    {css file="__STATIC__/css/icons/material/icons.css"}
    {css file="__PUBLIC__/admin/css/bootstrap.min.css"}
    {css file="__PUBLIC__/admin/css/bootstrap_limitless.min.css"}
    {css file="__PUBLIC__/admin/css/layout.min.css"}
    {css file="__PUBLIC__/admin/css/components.min.css"}
    {css file="__PUBLIC__/admin/css/colors.min.css"}
    <!-- /global stylesheets -->

    <!-- Core JS files -->
    {js file="__STATIC__/js/main/jquery.min.js"}
    {js file="__STATIC__/js/main/bootstrap.bundle.min.js"}
    {js file="__STATIC__/js/plugins/loaders/blockui.min.js"}
    <!-- /core JS files -->

    <!-- Theme JS files -->
    {js file="__PUBLIC__/admin/js/app.js"}
    <!-- /theme JS files -->

</head>
<body>

<div class="page-content">

    <!-- Main content -->
    <div class="content-wrapper">

        <!-- Content area -->
        <div class="content d-flex justify-content-center align-items-center">

            <!-- Container -->
            <div class="flex-fill">

                <!-- Error title -->
                <div class="text-center mb-3">
                    <h1 class="error-title offline-title">
                        <?php
                            switch($code){
                                case 1 : echo ':)'; break;
                                case 0 : echo ':('; break;
                                case 404 :
                                case 500 :
                                    echo $code; break;
                            }
                        ?>
                    </h1>
                    <h5><?php echo(strip_tags($msg));?></h5>
                    <p class="jump">
                        页面自动 <a id="href" href="<?php echo($url);?>">跳转</a> 等待时间： <b id="wait"><?php echo($wait);?></b>
                    </p>
                </div>
                <!-- /error title -->

            </div>
        </div>

    </div>

</div>

    <script type="text/javascript">
        (function(){
            var wait = document.getElementById('wait'),
                href = document.getElementById('href').href;
            var interval = setInterval(function(){
                var time = --wait.innerHTML;
                if(time <= 0) {
                    location.href = href;
                    clearInterval(interval);
                };
            }, 1000);
        })();
    </script>
</body>
</html>
